/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.insta;

/**
 *
 * @author ARNAUD
 */
public class Counter {
    int _count;
    private static Counter _instance;
    
    protected  Counter()
    {
      
    }
    public static Counter getInstance(){
          if(_instance == null){
            _instance = new Counter();
        }
          return _instance;
    }
    
   public int add(int i)
   {
       _count += i;
       return _count;
   }
   public int add(){
       return add(1);
   }
   
   public int getCount(){
       return _count;
   }
   
   public int reset(){
           _count = 0;
           return _count;
           }
   
}
